﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using commonFunctions;

namespace testFunctions
{
    public partial class asyncLogTester : Form
    {
        private asyncLog log;
        public asyncLogTester()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            log = new asyncLog(null, Convert.ToInt32(textBox2.Text.Trim()),Convert.ToInt32(textBox3.Text.Trim()));
            int inter = Convert.ToInt32(textBox1.Text.Trim());
            timer1.Interval = inter;
            timer1.Start();
            timer2.Interval = inter;
            timer2.Start();
            timer4.Interval = inter;
            timer4.Start();
            timer3.Interval = inter;
            timer3.Start();
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            log.add("test"+DateTime.Now.ToString("mm-ss-ffffff"), "title");
        }

        private void button2_Click(object sender, EventArgs e)
        {
            log.dump();
            timer1.Stop();
            timer2.Stop();
            timer3.Stop();
            timer4.Stop();
        }
    }
}
